package com.dcd.controller;

import com.dcd.pojo.Video_type;
import com.dcd.service.Video_typeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/Vido_typeController")
@CrossOrigin
public class Video_typeController {

    @Autowired
    private Video_typeService vido_typeService;

    /**
     * 首页视频所有标题方法
     * @return 视频所有类型
     */
    @GetMapping("/show_all")
    public List<Video_type> show_all(){
      return vido_typeService.selectAll();
    };
}
